import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      meta: {
        hasTitle: false
      },
      component: () => import('../components/login')
    },
    {
      path: '/clear',
      name: 'clear',
      meta: {
        hasTitle: false
      },
      component: () => import('../components/clear')
    },
    // 首页
    {
      path: '/index',
      name: 'index',
      meta: {
        hasTitle: true,
        title: '课程表'
      },
      component: () => import('../components/index/index2') // 首页课表
    },
    {
      path: '/checkRecord',
      name: 'checkRecord',
      meta: {
        hasTitle: true,
        title: '签到记录'
      },
      component: () => import('../components/index/checkRecord') // 签到记录
    },
    {
      path: '/checkStudentList',
      name: 'checkStudentList',
      meta: {
        hasTitle: true,
        title: 'VIP一对一课程'
      },
      component: () => import('../components/index/checkStudentList') // 一对一签到学生列表
    },
    {
      path: '/studentCheckDetail',
      name: 'studentCheckDetail',
      meta: {
        hasTitle: true,
        title: 'VIP个人签到记录'
      },
      component: () => import('../components/index/studentCheckDetail') // 学生个人签到详情
    },
    {
      path: '/select/student/list',
      name: 'selectStudentList',
      meta: {
        hasTitle: true,
        title: '学生列表'
      },
      component: () => import('../components/index/selectStudentList') // 选择学生列表
    },
    {
      path: '/courseRecord',
      name: 'courseRecord',
      meta: {
        hasTitle: true,
        title: '集体课程签到记录'
      },
      component: () => import('../components/index/courseRecord') // 集体课程签到记录
    },
    {
      path: '/courseRecordDetail',
      name: 'courseRecordDetail',
      meta: {
        hasTitle: true,
        title: '集体课程签到详情'
      },
      component: () => import('../components/index/courseRecordDetail') // 集体课程签到记录
    },
    // my我的
    {
      path: '/my/index',
      name: 'myIndex',
      meta: {
        hasTitle: false
      },
      component: () => import('../components/my') // 教师首页
    },
    {
      path: '/teacherImpInfo',
      name: 'teacherImpInfo',
      meta: {
        hasTitle: false
      },
      component: () => import('../components/my/teacherImpInfo') // 完善个人信息
    },
    {
      path: '/studentList',
      name: 'studentList',
      meta: {
        hasTitle: true,
        title: '我的学生'
      },
      component: () => import('../components/my/studentList') // 学生列表
    },
    {
      path: '/studentEdit',
      name: 'studentEdit',
      meta: {
        hasTitle: true,
        title: '学生信息编辑'
      },
      component: () => import('../components/my/studentEdit') // 编辑学生
    },
    {
      path: '/toCheckStudentList',
      name: 'toCheckStudentList',
      meta: {
        hasTitle: true,
        title: '学生列表'
      },
      component: () => import('../components/my/toCheckStudentList') // 学生打卡记录
    },
    {
      path: '/studentCheck',
      name: 'studentCheck',
      meta: {
        hasTitle: true,
        title: '打卡记录'
      },
      component: () => import('../components/my/studentCheck') // 学生打卡记录
    },
    {
      path: '/leaveList',
      name: 'leaveList',
      meta: {
        hasTitle: true,
        title: '请假列表'
      },
      component: () => import('../components/my/leaveList') // 学生请假列表
    },
    {
      path: '/leaveDetail/:id',
      name: 'leaveDetail',
      meta: {
        hasTitle: true,
        title: '请假详情'
      },
      component: () => import('../components/my/leaveDetail') // 学生请假详情
    },
    {
      path: '/editPoster',
      name: 'editPoster',
      meta: {
        hasTitle: true,
        title: '编辑海报'
      },
      component: () => import('../components/my/editPoster') // 编辑海报
    },
    {
      path: '/urge',
      name: 'urge',
      meta: {
        hasTitle: true,
        title: '催缴学费'
      },
      component: () => import('../components/my/urge') // 催缴学费
    },
    // 课程
    // {
    //   path: '/myCourse',
    //   name: 'myCourse',
    //   component: () => import('../components/course/myCourse') // 我的课程
    // },
    {
      path: '/editCourse',
      name: 'editCourse',
      meta: {
        hasTitle: true,
        title: '添加课程'
      },
      component: () => import('../components/course/editCourse') // 课程编辑、新增
    },
    // {
    //   path: '/courseDetail',
    //   name: 'courseDetail',
    //   component: () => import('../components/course/courseDetail') // 课程详情
    // },
    {
      path: '/courseAssess',
      name: 'courseAssess',
      meta: {
        hasTitle: true,
        title: '评价'
      },
      component: () => import('../components/course/courseAssess') // 课程评价
    },
    // 消息管理
    {
      path: '/message',
      name: 'message',
      meta: {
        hasTitle: true,
        title: '消息管理'
      },
      component: () => import('../components/message') // 消息管理首页
    },
    {
      path: '/message/course',
      name: 'courseMessage',
      meta: {
        hasTitle: true,
        title: '课程通知'
      },
      component: () => import('../components/message/courseMessage') // 课程消息
    },
    {
      path: '/message/ordinary/:type',
      name: 'ordinaryMessage',
      meta: {
        hasTitle: true,
        title: '活动通知'
      },
      component: () => import('../components/message/ordinaryMessage') // 普通消息
    },
    {
      path: '/message/send',
      name: 'sendMessage',
      meta: {
        hasTitle: true,
        title: '编辑课程通知'
      },
      component: () => import('../components/message/sendMessage') // 发送通知
    }
  ]
})
